home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: Parent Power / The Sunday Times - Parent Power.iso / pc / engine / map.swf / scripts / DefineSprite_215 / frame_1 / DoAction.as
Encoding:
Text File  |  2005-10-31  |  3.8 KB  |  99 lines

  1. stop();
  2. strLEAList = "Cornwall,Plymouth,Devon,Torbay,Somerset,Poole,Bournemouth,Dorset,Isle of Wight,Portsmouth,Southampton,Brighton and Hove,West Sussex,Hampshire,East Sussex,North Somerset,Bath and North East Somerset,Bristol,South Gloucestershire,Reading,West Berkshire,Wiltshire,Herefordshire,Gloucestershire,Wokingham,Bracknell Forest,Oxfordshire,Medway,Southend on Sea,Thurrock,Slough,Windsor and Maidenhead,Buckinghamshire,Milton Keynes,Surrey,Kent,Essex,Norfolk,Suffolk,Luton,Hertfordshire,Bedfordshire,Peterborough,Cambridgeshire,Rutland,Leicester,Northamptonshire,North East Lincolnshire,Lincolnshire,Kingston upon Hull,North Lincolnshire,North Tyneside,South Tyneside,Sunderland,Newcastle upon Tyne,Gateshead,Northumberland,Hartlepool,Redcar and Cleveland,Middlesbrough,Stockton-on-Tees,Darlington,Durham,Cumbria,East Riding of Yorkshire,Worcestershire,Telford and Wrekin,Shropshire,Warwickshire,Stoke-on-Trent,Derby,Nottingham,Leicestershire,Staffordshire,Rotherham,Nottinghamshire,Cheshire,Doncaster,Sheffield,Derbyshire,Blackpool,Warrington,Halton,Blackburn with Darwen,Barnsley,Wakefield,York,Kirklees,Calderdale,Bradford,Leeds,Lancashire,North Yorkshire,Orkney Islands,Shetland Islands,Isles of Scilly,Swindon";
  3. arrLEAs = strLEAList.split(",");
  4. delete strLEAList;
  5. arrGroups = ["Wales","Northern Ireland","Scotland"];
  6. arrZooms = ["London","West Midlands","Merseyside","Greater Manchester"];
  7. mcLEA = function()
  8. {
  9.    return this;
  10. };
  11. mcLEA.prototype = new LEAmap.mcRollover();
  12. mcLEA.prototype.onRollOver = function()
  13. {
  14.    LEAmap.showRollover(arrLEAs[this.nmIndex - 1],this);
  15. };
  16. mcLEA.prototype.onRelease = function()
  17. {
  18.    var _loc1_ = this;
  19.    if(_loc1_._name == "r_94_mc" || _loc1_._name == "r_95_mc")
  20.    {
  21.       if(LEAmap.selectedMap != "Scotland")
  22.       {
  23.          LEAmap.showRollover(arrLEAs[_loc1_._parent.r_95_mc.nmIndex - 1],_loc1_._parent.r_95_mc);
  24.          LEAmap.showRollover(arrLEAs[_loc1_._parent.r_94_mc.nmIndex - 1],_loc1_._parent.r_94_mc);
  25.          LEAmap.showRollover(arrLEAs[_loc1_.nmIndex - 1],_loc1_);
  26.          LEAmap.setSelectedLEA("Scotland");
  27.          LEAmap.setLEA(arrGroups[_loc1_._parent.g_3_mc.nmIndex - 1]);
  28.       }
  29.    }
  30.    else
  31.    {
  32.       LEAmap.setSelectedLEA(_loc1_);
  33.       LEAmap.setLEA(arrLEAs[_loc1_.nmIndex - 1],_loc1_.nmIndex - 1);
  34.       LEAmap.showRollover(arrLEAs[_loc1_.nmIndex - 1],_loc1_);
  35.    }
  36. };
  37. mcGroup = function()
  38. {
  39.    return this;
  40. };
  41. mcGroup.prototype = new LEAmap.mcRollover();
  42. mcGroup.prototype.onRollOver = function()
  43. {
  44.    LEAmap.showRollover(arrGroups[this.nmIndex - 1],this);
  45. };
  46. mcGroup.prototype.onRelease = function()
  47. {
  48.    var _loc1_ = this;
  49.    if(LEAmap.selectedMap != _loc1_)
  50.    {
  51.       if(_loc1_._name == "g_3_mc")
  52.       {
  53.          if(LEAmap.selectedMap != "Scotland")
  54.          {
  55.             LEAmap.showRollover(arrLEAs[_loc1_._parent.r_95_mc.nmIndex - 1],_loc1_._parent.r_95_mc);
  56.             LEAmap.showRollover(arrLEAs[_loc1_._parent.r_94_mc.nmIndex - 1],_loc1_._parent.r_94_mc);
  57.             LEAmap.setSelectedLEA("Scotland");
  58.          }
  59.       }
  60.       else
  61.       {
  62.          LEAmap.setSelectedLEA(_loc1_);
  63.       }
  64.       LEAmap.setLEA(arrGroups[_loc1_.nmIndex - 1]);
  65.    }
  66. };
  67. mcZoom = function()
  68. {
  69.    return this;
  70. };
  71. mcZoom.prototype = new LEAmap.mcRollover();
  72. mcZoom.prototype.onRollOver = function()
  73. {
  74.    LEAmap.showRollover(arrZooms[this.nmIndex - 1] + " - Click for more detail",this);
  75. };
  76. mcZoom.prototype.onRelease = function()
  77. {
  78.    LEAmap.zooms_mc.showZoom(this.nmIndex);
  79.    LEAmap.setLEA(arrZooms[this.nmIndex - 1]);
  80. };
  81. var i = 1;
  82. while(i <= 97)
  83. {
  84.    this["r_" + i + "_mc"].__proto__ = mcLEA.prototype;
  85.    i++;
  86. }
  87. i = 1;
  88. while(i <= 3)
  89. {
  90.    this["g_" + i + "_mc"].__proto__ = mcGroup.prototype;
  91.    i++;
  92. }
  93. i = 1;
  94. while(i <= 4)
  95. {
  96.    this["z_" + i + "_mc"].__proto__ = mcZoom.prototype;
  97.    i++;
  98. }
  99.